import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {IndexComponent} from "./index/index.component";
import {SpdetailComponent} from "./spdetail/spdetail.component";
import {NewsdetailComponent} from "./newsdetail/newsdetail.component";


const routes: Routes = [
  {path:'index',component:IndexComponent},
  {path:'spdetail',component:SpdetailComponent},
  {path:'newsdetatl',component:NewsdetailComponent},
  { path: '**', component: IndexComponent }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
